package com.example.myesstudy.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@Document(indexName = "es_test_index", type = "_doc", shards = 1, replicas = 1)
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    @Field(type = FieldType.Keyword)
    private String name;

    private int age;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String desc;


}
